package com.yunxi.controller.otd;

import com.yunxi.core.web.ApiResult;
import com.yunxi.core.web.ResponseUtil;
import com.yunxi.otd.service.OtdDailyPlanDubboService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 周度需求计划 前端控制器
 * </p>
 *
 * @author XUQI
 * @since 2019-05-09
 */
@RestController
@RequestMapping("/admin/otd/daily")
@Api(tags = "OTD:DAILY", description = "生产日排程")
public class OtdDailyPlanController {

//    @Reference(version = "${demo.service.version}",
//        application = "${dubbo.application.id}",
//        registry = "${dubbo.registry.address}",
//        url = "${dubbo.application.url}",
//        check = false,
//        timeout = 999999999
//    )
    @Autowired
    OtdDailyPlanDubboService dailyPlanDubboService;

    @GetMapping("/page")
    @ApiOperation(value = "日排程查询")
    public ApiResult page(String year, String month, String modelCode) {
        return ResponseUtil.ok(dailyPlanDubboService.findWeekPlanDaily(year, month, modelCode));
    }

}
